<{include file="public_html/header.html"}>
<{include file="public_html/left_menu.html"}>
<style>
	.acc-data-selector{background-color:#fff;border:1px solid #d8d8d8;position:absolute;width:570px;z-index:999}
.acc-data-selector-selected{border-right:1px solid #d8d8d8;font-size:0;margin-right:37px;max-height:108px;min-height:36px;overflow:auto;padding:8px 0 0 8px; height:42px;}
.acc-data-selector-selected .item{border:1px solid #eaeaea;color:#949494;cursor:pointer;display:inline-block;font-size:12px;height:26px;line-height:26px;margin:0 8px 0px 0;overflow:hidden;position:relative;text-indent:6px;width:116px}
.acc-data-selector-selected .item .iclose{background-color:#fff;height:26px;position:absolute;right:0;top:0;width:20px;font-weight:400}
.acc-data-selector-selected .item:hover{border-color:#36b888;color:#36b888}
.acc-data-selector-selected .item:hover .iclose{background-color:#36b888;color:#fff}
.acc-data-selector-table{border-top:1px solid #d8d8d8;font-size:14px;overflow:hidden; background:url(/static/school/images/zj_bg.png) repeat-y; min-height:200px;;}
.acc-data-selector-close{background:rgba(0,0,0,0) url(/static/school/images/check.png) no-repeat scroll -28px 0;cursor:pointer;height:12px;position:absolute;right:10px;top:8px;width:18px}
.acc-data-selector-empty{display:block;font-size:16px;padding:0;text-align:center}
.acc-data-selector-group{background-color:#f3f3f3;float:left;padding:12px 0;text-indent:24px;width:104px; margin:0;}
.acc-data-selector-group .title{cursor:pointer;overflow:hidden;padding:6px 0;text-overflow:ellipsis;white-space:nowrap}
.acc-data-selector-group .title:hover{background-color:#9fc}
.acc-data-selector-group .active{background-color:#43bc8f;color:#fff;visibility:visible}
.acc-data-selector-list{overflow:auto;padding:12px 0}
.acc-data-selector-loading{display:none;font-size:16px;position:relative;text-align:center;top:100px}
.acc-data-selector-items li{cursor:pointer;padding:6px 0 6px 20px}
.acc-data-selector-items .title{font-weight:700}
.acc-data-selector-items .ico-check{background:url(/static/school/images/check.png) no-repeat;display:inline-block;height:14px;margin-right:10px;vertical-align:middle;width:14px}
.acc-data-selector-items .checked .ico-check{background-position:-14px 0}
</style>
<blockquote class="layui-elem-quote"><{$action}></blockquote>

<form class="layui-form " method="post" action="/tiku/add_test_volume">
	<!--步骤二-->
	<div class="item m-b10 add_step" >
		<div class="item m-b10 add_step">
			<div class="layui-form-item">
				<label class="layui-form-label">试卷名称</label>
				<div class="layui-input-block">
					<input type="text" name="name" id="name" value="<{$test_volume_name}>" class="layui-input" />
				</div>
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">题目来源</label>
			<div class="layui-input-block">
				<select name="topic_source" id="source_type" lay-filter="source_type">
					<option value="1" selected>系统题目</option>
				</select>
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">出题范围</label>
			<div class="layui-input-block acc-data-selector-selected" id="selected_chapter">
				<div style="float:left; width:100px;"><input class="layui-btn layui-btn-warm" id="chapter_id" value="选择章节" type="button" style="font-size: 14px;"></div>
				<div style="float:left;" id="selected_chapter"> </div>
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">出题类型</label>
			<div class="layui-input-block">
				<input type="radio" name="create_topic_type" value="1" checked  title="系统出题" lay-filter="create_topic_type">
				<input type="radio" name="create_topic_type" value="2"  title="自主出题" lay-filter="create_topic_type">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">组卷模版</label>
			<div class="layui-input-block">
				<select name="template_id" id="template_id" lay-filter="template_id">
					<option value="">请选择模版</option>
					<option value="0">自定义模版</option>
					<{foreach from=$templates item=template}>
						<option value="<{$template.id}>"><{$template.template_name}></option>
					<{/foreach}>
				</select>
			</div>
		</div>

		<div class="layui-form-item" id="template_name" style="display: none;">
			<label class="layui-form-label">模版名称</label>
			<div class="layui-input-block">
				<input type="text" id="template_name_text" value=""  class="layui-input"/>
			</div>
		</div>

		<div class="layui-form-item template_box">
		    <label class="layui-form-label">单选题数量</label>
		    <div class="layui-input-inline">
		      	<input value="20" type="text" name="number[1]" lay-verify="number" autocomplete="off" class="layui-input number" />
		    </div>
		    <label class="layui-form-label">单题分值</label>
		    <div class="layui-input-inline">
		      	<input value="1" type="text" name="fraction[1]" lay-verify="number" autocomplete="off" class="layui-input fraction" />
		    </div>
		    <div class="layui-form-mid layui-word-aux">分</div>
	  	</div>

	  	<div class="layui-form-item template_box">
		    <label class="layui-form-label">多选题数量</label>
		    <div class="layui-input-inline">
	      		<input value="20" type="text" name="number[2]" lay-verify="number" autocomplete="off" class="layui-input number" />
		    </div>
		    <label class="layui-form-label">单题分值</label>
		    <div class="layui-input-inline">
		      	<input value="1" type="text" name="fraction[2]" lay-verify="number" autocomplete="off" class="layui-input fraction" />
		    </div>
		    <div class="layui-form-mid layui-word-aux">分</div>
	  	</div>

	  	<div class="layui-form-item template_box">
		    <label class="layui-form-label">判断题数量</label>
		    <div class="layui-input-inline">
	      		<input value="20" type="text" name="number[3]" lay-verify="number" autocomplete="off" class="layui-input number" />
		    </div>
		    <label class="layui-form-label">单题分值</label>
		    <div class="layui-input-inline">
		      	<input value="1" type="text" name="fraction[3]" lay-verify="number" autocomplete="off" class="layui-input fraction" />
		    </div>
		    <div class="layui-form-mid layui-word-aux">分</div>
	  	</div>

	  	<div class="layui-form-item template_box">
		    <label class="layui-form-label">计算分析题数量</label>
		    <div class="layui-input-inline">
	      		<input value="20" type="text" name="number[4]" lay-verify="number" autocomplete="off" class="layui-input number" />
		    </div>
		    <label class="layui-form-label">单题分值</label>
		    <div class="layui-input-inline">
		      	<input value="1" type="text" name="fraction[4]" lay-verify="number" autocomplete="off" class="layui-input fraction" />
		    </div>
		    <div class="layui-form-mid layui-word-aux">分</div>
	  	</div>

	  	<div class="layui-form-item template_box">
		    <label class="layui-form-label">填空题数量</label>
		    <div class="layui-input-inline">
	      		<input value="20" type="text" name="number[5]" lay-verify="number" autocomplete="off" class="layui-input number" />
		    </div>
		    <label class="layui-form-label">单题分值</label>
		    <div class="layui-input-inline">
		      	<input value="1" type="text" name="fraction[5]" lay-verify="number" autocomplete="off" class="layui-input fraction" />
		    </div>
		    <div class="layui-form-mid layui-word-aux">分</div>
	  	</div>

	  	<div class="layui-form-item template_box">
		    <label class="layui-form-label">计算题数量</label>
		    <div class="layui-input-inline">
	      		<input value="20" type="text" name="number[6]" lay-verify="number" autocomplete="off" class="layui-input number" />
		    </div>
		    <label class="layui-form-label">单题分值</label>
		    <div class="layui-input-inline">
		      	<input value="1" type="text" name="fraction[6]" lay-verify="number" autocomplete="off" class="layui-input fraction" />
		    </div>
		    <div class="layui-form-mid layui-word-aux">分</div>
	  	</div>

	  	<div class="layui-form-item template_box">
		    <label class="layui-form-label">不定向选择题数量</label>
		    <div class="layui-input-inline">
	      		<input value="20" type="text" name="number[7]" lay-verify="number" autocomplete="off" class="layui-input number" />
		    </div>
		    <label class="layui-form-label">单题分值</label>
		    <div class="layui-input-inline">
		      	<input value="1" type="text" name="fraction[7]" lay-verify="number" autocomplete="off" class="layui-input fraction" />
		    </div>
		    <div class="layui-form-mid layui-word-aux">分</div>
	  	</div>

	  	<div class="layui-form-item template_box">
		    <label class="layui-form-label">名词解释数量</label>
		    <div class="layui-input-inline">
	      		<input value="20" type="text" name="number[8]" lay-verify="number" autocomplete="off" class="layui-input number" />
		    </div>
		    <label class="layui-form-label">单题分值</label>
		    <div class="layui-input-inline">
		      	<input value="1" type="text" name="fraction[8]" lay-verify="number" autocomplete="off" class="layui-input fraction" />
		    </div>
		    <div class="layui-form-mid layui-word-aux">分</div>
	  	</div>

	  	<div class="layui-form-item template_box">
		    <label class="layui-form-label">简答题数量</label>
		    <div class="layui-input-inline">
	      		<input value="20" type="text" name="number[9]" lay-verify="number" autocomplete="off" class="layui-input number" />
		    </div>
		    <label class="layui-form-label">单题分值</label>
		    <div class="layui-input-inline">
		      	<input value="1" type="text" name="fraction[9]" lay-verify="number" autocomplete="off" class="layui-input fraction" />
		    </div>
		    <div class="layui-form-mid layui-word-aux">分</div>
	  	</div>


		<blockquote class="layui-elem-quote">
		  	<span class="total">作业总分：<i style="color:red;">140</i> 分</span>
			<span class="add_template"><input type="button" class="layui-btn layui-btn-normal layui-btn-radius" id="add_template" value="保存模板" /></span>
			<span class="remove_template" data-tid="" style="display:none">删除模板</span>
		</blockquote>

		<div id="topic_list" style="display:none;">
			<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
			  	<legend>答题卡</legend>
			</fieldset>

			<div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">单选题</label>
			    <div class="layui-input-inline" id="type_box_1" style="margin-top: 15px;">
		      		<{section name=sn loop=20}>
					<!-- <span class="type_1 type_span"><{$smarty.section.sn.index+1}></span> -->
					<input class="type_1 type_span" title="<{if $smarty.section.sn.index < 9}>0<{/if}><{$smarty.section.sn.index+1}>" disabled type="checkbox" />
					<{/section}>
			    </div>
		  	</div>

		  	<div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">多选题</label>
			    <div class="layui-input-inline" id="type_box_2" style="margin-top: 15px;">
		      		<{section name=sn loop=20}>
					<!-- <span class="type_1 type_span"><{$smarty.section.sn.index+1}></span> -->
					<input class="type_2 type_span" title="<{if $smarty.section.sn.index < 9}>0<{/if}><{$smarty.section.sn.index+1}>" disabled type="checkbox" />
					<{/section}>
			    </div>
		  	</div>

		  	<div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">判断题</label>
			    <div class="layui-input-inline" id="type_box_3" style="margin-top: 15px;">
		      		<{section name=sn loop=20}>
					<!-- <span class="type_1 type_span"><{$smarty.section.sn.index+1}></span> -->
					<input class="type_3 type_span" title="<{if $smarty.section.sn.index < 9}>0<{/if}><{$smarty.section.sn.index+1}>" disabled type="checkbox" />
					<{/section}>
			    </div>
		  	</div>

		  	<div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">计算分析题</label>
			    <div class="layui-input-inline" id="type_box_4" style="margin-top: 15px;">
		      		<{section name=sn loop=20}>
					<!-- <span class="type_1 type_span"><{$smarty.section.sn.index+1}></span> -->
					<input class="type_4 type_span" title="<{if $smarty.section.sn.index < 9}>0<{/if}><{$smarty.section.sn.index+1}>" disabled type="checkbox" />
					<{/section}>
			    </div>
		  	</div>

		  	<div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">填空题</label>
			    <div class="layui-input-inline" id="type_box_5" style="margin-top: 15px;">
		      		<{section name=sn loop=20}>
					<!-- <span class="type_1 type_span"><{$smarty.section.sn.index+1}></span> -->
					<input class="type_5 type_span" title="<{if $smarty.section.sn.index < 9}>0<{/if}><{$smarty.section.sn.index+1}>" disabled type="checkbox" />
					<{/section}>
			    </div>
		  	</div>

		  	<div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">计算题</label>
			    <div class="layui-input-inline" id="type_box_6" style="margin-top: 15px;">
		      		<{section name=sn loop=20}>
					<!-- <span class="type_1 type_span"><{$smarty.section.sn.index+1}></span> -->
					<input class="type_6 type_span" title="<{if $smarty.section.sn.index < 9}>0<{/if}><{$smarty.section.sn.index+1}>" disabled type="checkbox" />
					<{/section}>
			    </div>
		  	</div>

		  	<div class="layui-form-item layui-form-text">
			    <label class="layui-form-label" style="width: auto;">不定向选择题</label>
			    <div class="layui-input-inline" id="type_box_7" style="margin-top: 15px;">
		      		<{section name=sn loop=20}>
					<!-- <span class="type_1 type_span"><{$smarty.section.sn.index+1}></span> -->
					<input class="type_7 type_span" title="<{if $smarty.section.sn.index < 9}>0<{/if}><{$smarty.section.sn.index+1}>" disabled type="checkbox" />
					<{/section}>
			    </div>
		  	</div>

		  	<div class="layui-form-item layui-form-text">
			    <label class="layui-form-label" style="width: auto;">名词解释</label>
			    <div class="layui-input-inline" id="type_box_8" style="margin-top: 15px;">
		      		<{section name=sn loop=20}>
					<!-- <span class="type_1 type_span"><{$smarty.section.sn.index+1}></span> -->
					<input class="type_8 type_span" title="<{if $smarty.section.sn.index < 9}>0<{/if}><{$smarty.section.sn.index+1}>" disabled type="checkbox" />
					<{/section}>
			    </div>
		  	</div>

		  	<div class="layui-form-item layui-form-text">
			    <label class="layui-form-label" style="width: auto;">简答题</label>
			    <div class="layui-input-inline" id="type_box_9" style="margin-top: 15px;">
		      		<{section name=sn loop=20}>
					<!-- <span class="type_1 type_span"><{$smarty.section.sn.index+1}></span> -->
					<input class="type_9 type_span" title="<{if $smarty.section.sn.index < 9}>0<{/if}><{$smarty.section.sn.index+1}>" disabled type="checkbox" />
					<{/section}>
			    </div>
		  	</div>

			<div id="type_1"></div>
			<div id="type_2"></div>
			<div id="type_3"></div>
			<div id="type_4"></div>
			<div id="type_5"></div>
			<div id="type_6"></div>
			<div id="type_7"></div>
			<div id="type_8"></div>
			<div id="type_9"></div>
		</div>

		<iframe id="topic_list_box" border=2 frameborder=0 width="100%" marginheight=0 marginwidth=0 scrolling=no style="display:none;">
		</iframe>

		
</form>
<div class="layui-input-block">
	<input type="submit" class="layui-btn" value="下一步" />
</div>
<{include file="public_html/footer.html"}>
<div class="acc-data-selector" style=" display: none;">
		<div class="acc-data-selector-selected">

		</div>
		<{if $chapter_list_data|count  > 0}>
			<div class="acc-data-selector-table">
			<ul class="acc-data-selector-group">
			<{foreach from=$chapter_list_data item=item name=loop}>
				<li class="title act-showItems <{if $smarty.foreach.loop.index == 0}>active<{/if}>" data-gid="1"><{$item.title}></li>
			<{/foreach}>
			</ul>
			<{foreach from=$chapter_list_data item=item key=key name=loop1}>
				<{if isset($item.sub) AND $item.sub|count > 0}>
					<div class="acc-data-selector-list" <{if $smarty.foreach.loop1.index > 0}>style="display: none;"<{/if}>>
					<ul class="acc-data-selector-items">
					<{foreach from=$item.sub item=item1}>
						<li class="item act-checkItem" topic_id="<{$item1.id}>"><i class="ico-check"></i><{$item1.title}></li>
						<!-- <{if isset($item1.sub) AND $item1.sub|count > 0}>
							<{foreach from=$item1.sub item=item2}>
								<li class="item act-checkItem" topic_id="<{$item2.id}>"><i class="ico-check"></i><{$item2.title}></li>
							<{/foreach}>
						<{/if}> -->
					<{/foreach}>
					</ul>
					</div>
				<{/if}>
			<{/foreach}>
			</div>
		<{/if}>
		<i class="acc-data-selector-close act-close"></i>
	</div>
</div>
<script src="/static/manage/js/add_test_volume.js" type="text/javascript"></script>
